Integrand size = 19, antiderivative size = 82 \[ \int \cot ^4(c+d x) (a+a \sin (c+d x)) \, dx=a x+\frac {3 a \text {arctanh}(\cos (c+d x))}{2 d}-\frac {3 a \cos (c+d x)}{2 d}+\frac {a \cot (c+d x)}{d}-\frac {a \cos (c+d x) \cot ^2(c+d x)}{2 d}-\frac {a \cot ^3(c+d x)}{3 d} \]
a*x+3/2*a*arctanh(cos(d*x+c))/d-3/2*a*cos(d*x+c)/d+a*cot(d*x+c)/d-1/2*a*co s(d*x+c)*cot(d*x+c)^2/d-1/3*a*cot(d*x+c)^3/d
Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.
Time = 0.02 (sec) , antiderivative size = 125, normalized size of antiderivative = 1.52 \[ \int \cot ^4(c+d x) (a+a \sin (c+d x)) \, dx=-\frac {a \cos (c+d x)}{d}-\frac {a \csc ^2\left (\frac {1}{2} (c+d x)\right )}{8 d}-\frac {a \cot ^3(c+d x) \operatorname {Hypergeometric2F1}\left (-\frac {3}{2},1,-\frac {1}{2},-\tan ^2(c+d x)\right )}{3 d}+\frac {3 a \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )}{2 d}-\frac {3 a \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )}{2 d}+\frac {a \sec ^2\left (\frac {1}{2} (c+d x)\right )}{8 d} \]
-((a*Cos[c + d*x])/d) - (a*Csc[(c + d*x)/2]^2)/(8*d) - (a*Cot[c + d*x]^3*H ypergeometric2F1[-3/2, 1, -1/2, -Tan[c + d*x]^2])/(3*d) + (3*a*Log[Cos[(c + d*x)/2]])/(2*d) - (3*a*Log[Sin[(c + d*x)/2]])/(2*d) + (a*Sec[(c + d*x)/2 ]^2)/(8*d)
Time = 0.27 (sec) , antiderivative size = 82, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {3042, 3189, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \cot ^4(c+d x) (a \sin (c+d x)+a) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {a \sin (c+d x)+a}{\tan (c+d x)^4}dx\) |
\(\Big \downarrow \) 3189 |
\(\displaystyle \int \left (a \cot ^4(c+d x)+a \cos (c+d x) \cot ^3(c+d x)\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {3 a \text {arctanh}(\cos (c+d x))}{2 d}-\frac {3 a \cos (c+d x)}{2 d}-\frac {a \cot ^3(c+d x)}{3 d}+\frac {a \cot (c+d x)}{d}-\frac {a \cos (c+d x) \cot ^2(c+d x)}{2 d}+a x\) |
a*x + (3*a*ArcTanh[Cos[c + d*x]])/(2*d) - (3*a*Cos[c + d*x])/(2*d) + (a*Co t[c + d*x])/d - (a*Cos[c + d*x]*Cot[c + d*x]^2)/(2*d) - (a*Cot[c + d*x]^3) /(3*d)
3.4.72.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((g_.)*tan[(e_.) + (f_.)*( x_)])^(p_.), x_Symbol] :> Int[ExpandIntegrand[(g*Tan[e + f*x])^p, (a + b*Si n[e + f*x])^m, x], x] /; FreeQ[{a, b, e, f, g, p}, x] && EqQ[a^2 - b^2, 0] && IGtQ[m, 0]
Time = 0.20 (sec) , antiderivative size = 86, normalized size of antiderivative = 1.05
method | result | size |
derivativedivides | \(\frac {a \left (-\frac {\cos ^{5}\left (d x +c \right )}{2 \sin \left (d x +c \right )^{2}}-\frac {\left (\cos ^{3}\left (d x +c \right )\right )}{2}-\frac {3 \cos \left (d x +c \right )}{2}-\frac {3 \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{2}\right )+a \left (-\frac {\left (\cot ^{3}\left (d x +c \right )\right )}{3}+\cot \left (d x +c \right )+d x +c \right )}{d}\) | \(86\) |
default | \(\frac {a \left (-\frac {\cos ^{5}\left (d x +c \right )}{2 \sin \left (d x +c \right )^{2}}-\frac {\left (\cos ^{3}\left (d x +c \right )\right )}{2}-\frac {3 \cos \left (d x +c \right )}{2}-\frac {3 \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{2}\right )+a \left (-\frac {\left (\cot ^{3}\left (d x +c \right )\right )}{3}+\cot \left (d x +c \right )+d x +c \right )}{d}\) | \(86\) |
risch | \(a x -\frac {a \,{\mathrm e}^{i \left (d x +c \right )}}{2 d}-\frac {a \,{\mathrm e}^{-i \left (d x +c \right )}}{2 d}+\frac {a \left (12 i {\mathrm e}^{4 i \left (d x +c \right )}+3 \,{\mathrm e}^{5 i \left (d x +c \right )}-12 i {\mathrm e}^{2 i \left (d x +c \right )}+8 i-3 \,{\mathrm e}^{i \left (d x +c \right )}\right )}{3 d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{3}}+\frac {3 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{2 d}-\frac {3 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{2 d}\) | \(139\) |
parallelrisch | \(\frac {a \left (24 d x -36 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (\sec ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \left (\csc ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-18 \sec \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\csc ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+3 \left (\sec ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \left (\csc ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+24 \left (\cot ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (d x +c \right )-32 \left (\cot ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+48 \cot \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\csc ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-75 \left (\cot ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+45 \left (\csc ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )\right )}{24 d}\) | \(173\) |
norman | \(\frac {a x \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+a x \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {a}{24 d}-\frac {a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{8 d}+\frac {7 a \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{12 d}-\frac {7 a \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{12 d}+\frac {a \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d}+\frac {a \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{24 d}-\frac {9 a \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}-\frac {3 a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}\) | \(180\) |
1/d*(a*(-1/2/sin(d*x+c)^2*cos(d*x+c)^5-1/2*cos(d*x+c)^3-3/2*cos(d*x+c)-3/2 *ln(csc(d*x+c)-cot(d*x+c)))+a*(-1/3*cot(d*x+c)^3+cot(d*x+c)+d*x+c))
Leaf count of result is larger than twice the leaf count of optimal. 160 vs. \(2 (74) = 148\).
Time = 0.27 (sec) , antiderivative size = 160, normalized size of antiderivative = 1.95 \[ \int \cot ^4(c+d x) (a+a \sin (c+d x)) \, dx=\frac {16 \, a \cos \left (d x + c\right )^{3} + 9 \, {\left (a \cos \left (d x + c\right )^{2} - a\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) - 9 \, {\left (a \cos \left (d x + c\right )^{2} - a\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) - 12 \, a \cos \left (d x + c\right ) + 6 \, {\left (2 \, a d x \cos \left (d x + c\right )^{2} - 2 \, a \cos \left (d x + c\right )^{3} - 2 \, a d x + 3 \, a \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{12 \, {\left (d \cos \left (d x + c\right )^{2} - d\right )} \sin \left (d x + c\right )} \]
1/12*(16*a*cos(d*x + c)^3 + 9*(a*cos(d*x + c)^2 - a)*log(1/2*cos(d*x + c) + 1/2)*sin(d*x + c) - 9*(a*cos(d*x + c)^2 - a)*log(-1/2*cos(d*x + c) + 1/2 )*sin(d*x + c) - 12*a*cos(d*x + c) + 6*(2*a*d*x*cos(d*x + c)^2 - 2*a*cos(d *x + c)^3 - 2*a*d*x + 3*a*cos(d*x + c))*sin(d*x + c))/((d*cos(d*x + c)^2 - d)*sin(d*x + c))
Timed out. \[ \int \cot ^4(c+d x) (a+a \sin (c+d x)) \, dx=\text {Timed out} \]
Time = 0.30 (sec) , antiderivative size = 92, normalized size of antiderivative = 1.12 \[ \int \cot ^4(c+d x) (a+a \sin (c+d x)) \, dx=\frac {4 \, {\left (3 \, d x + 3 \, c + \frac {3 \, \tan \left (d x + c\right )^{2} - 1}{\tan \left (d x + c\right )^{3}}\right )} a + 3 \, a {\left (\frac {2 \, \cos \left (d x + c\right )}{\cos \left (d x + c\right )^{2} - 1} - 4 \, \cos \left (d x + c\right ) + 3 \, \log \left (\cos \left (d x + c\right ) + 1\right ) - 3 \, \log \left (\cos \left (d x + c\right ) - 1\right )\right )}}{12 \, d} \]
1/12*(4*(3*d*x + 3*c + (3*tan(d*x + c)^2 - 1)/tan(d*x + c)^3)*a + 3*a*(2*c os(d*x + c)/(cos(d*x + c)^2 - 1) - 4*cos(d*x + c) + 3*log(cos(d*x + c) + 1 ) - 3*log(cos(d*x + c) - 1)))/d
Time = 0.39 (sec) , antiderivative size = 141, normalized size of antiderivative = 1.72 \[ \int \cot ^4(c+d x) (a+a \sin (c+d x)) \, dx=\frac {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 3 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 24 \, {\left (d x + c\right )} a - 36 \, a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) - 15 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \frac {48 \, a}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1} + \frac {66 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 15 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 3 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - a}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3}}}{24 \, d} \]
1/24*(a*tan(1/2*d*x + 1/2*c)^3 + 3*a*tan(1/2*d*x + 1/2*c)^2 + 24*(d*x + c) *a - 36*a*log(abs(tan(1/2*d*x + 1/2*c))) - 15*a*tan(1/2*d*x + 1/2*c) - 48* a/(tan(1/2*d*x + 1/2*c)^2 + 1) + (66*a*tan(1/2*d*x + 1/2*c)^3 + 15*a*tan(1 /2*d*x + 1/2*c)^2 - 3*a*tan(1/2*d*x + 1/2*c) - a)/tan(1/2*d*x + 1/2*c)^3)/ d
Time = 9.72 (sec) , antiderivative size = 228, normalized size of antiderivative = 2.78 \[ \int \cot ^4(c+d x) (a+a \sin (c+d x)) \, dx=\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,d}-\frac {-5\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+17\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3-\frac {14\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{3}+a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+\frac {a}{3}}{d\,\left (8\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+8\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\right )}-\frac {5\,a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{8\,d}+\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{24\,d}-\frac {3\,a\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{2\,d}-\frac {2\,a\,\mathrm {atan}\left (\frac {4\,a^2}{6\,a^2+4\,a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}-\frac {6\,a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{6\,a^2+4\,a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d} \]
(a*tan(c/2 + (d*x)/2)^2)/(8*d) - (a/3 + a*tan(c/2 + (d*x)/2) - (14*a*tan(c /2 + (d*x)/2)^2)/3 + 17*a*tan(c/2 + (d*x)/2)^3 - 5*a*tan(c/2 + (d*x)/2)^4) /(d*(8*tan(c/2 + (d*x)/2)^3 + 8*tan(c/2 + (d*x)/2)^5)) - (5*a*tan(c/2 + (d *x)/2))/(8*d) + (a*tan(c/2 + (d*x)/2)^3)/(24*d) - (3*a*log(tan(c/2 + (d*x) /2)))/(2*d) - (2*a*atan((4*a^2)/(6*a^2 + 4*a^2*tan(c/2 + (d*x)/2)) - (6*a^ 2*tan(c/2 + (d*x)/2))/(6*a^2 + 4*a^2*tan(c/2 + (d*x)/2))))/d